<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
      const p1 = new Promise((resolve,reject)=>{
            resolve()
        })
       
       p1.then(()=>{
            console.log('1');
        })
        // 就算是一个成功的promise调用的then,then里面的回调函数本质还是异步执行
        // 这里同步代码打印的2  比 then里面的1 先执行
        console.log('2');
        console.log('p1',p1);
    </script>
</body>
</html>